<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
<div id="app">
    <!-- 通过时间更新日期 -->
    <button @click="getdate">{{nowtime}}</button>
    </div>
    <!-- 通过计算属性更新日期 -->
    <div>
        <button></button>
    </div>
    <script src="..//js/vue.js"></script>
    <script>
        const app = new Vue({
            el:"#app",
            data:{
                massage:"121212"
            },
            computed:{
                getdate(){
                    return new Date().toLocaleDateString()
                }
            },
            methods:{
                show(){
                    this.nowtime = this.getdate
                }
            }
        })
    </script>

</body>
</html>